<ion-view id="view-amount" hide-tabs>
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>
      {{'Enter amount' | translate}}
    </ion-nav-title>
    <ion-nav-back-button>
    </ion-nav-back-button>
    <ion-nav-buttons side="secondary">
      <button class="button back-button" ng-click="showSendMaxMenu()" ng-if="showMenu">
        <i class="icon ion-ios-more"></i>
      </button>
    </ion-nav-buttons>
  </ion-nav-bar>

  <ion-content scroll="false">

    <div ng-if="!customAmount && !nextStep">
      <div class="item item-no-bottom-border recipient-label" translate>Recipient</div>

      <div class="item item-text-wrap item-icon-left bitcoin-address">
        <i class="icon big-icon-svg" ng-if="recipientType == 'wallet'">
          <img src="img/icon-wallet.svg" ng-class="{'wallet-background-color-default': !toColor}" ng-style="{'background-color': toColor}"
            class="bg" />
        </i>
        <span ng-if="recipientType == 'contact'">
          <i class="icon big-icon-svg" ng-if="isChromeApp">
            <img src="img/contact-placeholder.svg" class="bg" />
          </i>
          <gravatar ng-if="!isChromeApp" class="send-gravatar" name="{{toName}}" height="30" width="30" email="{{toEmail}}"></gravatar>
        </span>
        <span ng-if="!recipientType">
          <i class="icon big-icon-svg">
            <img src="img/contact-placeholder.svg" class="bg" />
          </i>
        </span>
        <span class="m10l">{{toName || toAddress}}</span>
      </div>
    </div>

    <div ng-class="{'amount-pane-recipient': !customAmount && !nextStep,
      'amount-pane-no-recipient': customAmount || nextStep}">

      <div class="amount-bar oh">
        <div class="title">
          <span translate>Amount</span>
        </div>
        <div class="m10t size-12" ng-if="shiftMin && shiftMax">
          <div>Min: {{shiftMin}}</div>
          <div>Max: {{shiftMax}}</div>
        </div>
      </div>

      <div class="amount">
        <div class="amount__editable" ng-class="{'amount__editable--minimize': smallFont, 'amount__editable--standard': !smallFont, 'amount__editable--placeholder': !amount}">
          <span class="amount__number">{{amount || "0.00" }}</span>
          <a class="amount__currency-toggle" ng-click="changeUnit()">{{unit}}</a>
        </div>
        <div ng-class="{'amount__results--minimize': smallFont, 'amount__results--standard': !smallFont, 'amount__results--placeholder': amountResult}"
          ng-click="changeAlternativeUnit()">
          <div class="amount__result" ng-show="globalResult">{{globalResult}} {{unit}}</div>
          <div class="amount__result-equiv" ng-show="alternativeAmount">&asymp; {{alternativeAmount || '0.00'}} {{alternativeUnit}}</div>
          <div class="amount__result-equiv" ng-show="!alternativeAmount">&nbsp;</div>
        </div>
      </div>
    </div>


    <div class="keypad">
      <div class="row">
        <div class="col col-25 col-offset-75 operator-send" ng-show="allowSend" ng-click="finish()">
          <i class="icon ion-ios-arrow-thin-right"></i>
        </div>
      </div>
      <div class="row">
        <div class="col digit" ng-click="pushDigit('7')">7</div>
        <div class="col digit" ng-click="pushDigit('8')">8</div>
        <div class="col digit" ng-click="pushDigit('9')">9</div>
        <div class="col operator" ng-click="pushOperator('/')">&divide;</div>
      </div>

      <div class="row">
        <div class="col digit" ng-click="pushDigit('4')">4</div>
        <div class="col digit" ng-click="pushDigit('5')">5</div>
        <div class="col digit" ng-click="pushDigit('6')">6</div>
        <div class="col operator" ng-click="pushOperator('x')">&times;</div>
      </div>

      <div class="row">
        <div class="col digit" ng-click="pushDigit('1')">1</div>
        <div class="col digit" ng-click="pushDigit('2')">2</div>
        <div class="col digit" ng-click="pushDigit('3')">3</div>
        <div class="col operator" ng-click="pushOperator('+')">&plus;</div>
      </div>

      <div class="row">
        <div class="col digit" ng-click="pushDigit('.')">.</div>
        <div class="col digit" ng-click="pushDigit('0')">0</div>
        <div class="col digit icon ion-backspace-outline" ng-click="removeDigit()"></div>
        <div class="col operator" ng-click="pushOperator('-')">&minus;</div>
      </div>
    </div>
  </ion-content>
  <item-selector item-selector-label="itemSelectorLabel" item-selector-show="showSendMax" item-selector-on-select="sendMax">
  </item-selector>
</ion-view>
